package com.food.dao.service;

import java.util.List;

import com.food.dao.FoodsearchDAOJdbc;
import com.food.dao.in.FoodsearchDAO;
import com.food.model.Foodsearch;

public class FoodsearchService {
	
	FoodsearchDAO dao = new FoodsearchDAOJdbc();
	public void insertFoodsearch (Foodsearch bean){
		if(bean!=null){
    		dao.insertFoodsearch(bean);
    	}
		
	}
	public void updateFoodsearch (Foodsearch bean){
		if(bean!=null){
    		dao.updateFoodsearch(bean.getFcid(),bean.getFsname(),bean.getFsid());
    	}
		
	}
	public void deleteFoodsearch (Foodsearch bean){
		if(bean!=null){
    		dao.deleteFoodsearch(bean.getFsid());
    	}
	}
	
	public Foodsearch findFoodsearchByID(Foodsearch bean){
		return dao.findFoodsearchByID(bean.getFsid());
	}
	public List<Foodsearch > findFoodsearchByFoodcategory (Foodsearch bean){
		return dao.findFoodsearchByFoodcategory(bean.getFcid());
	}
}
